<template>
  <div id="container"><van-nav-bar left-arrow @click-left="$router.back()" /></div>
</template>

<script>
export default {
  components: {},
  props: {},
  data() {
    return {}
  },
  computed: {},
  watch: {},
  created() {},
  methods: {},
  mounted() {
    var map = new BMapGL.Map('container')

    // 经度和纬度
    var point = new BMapGL.Point(120.362823, 30.312524)

    // 初始化
    map.centerAndZoom(point, 15)

    // 绘制圆 用文本标注
    var content = '宝山<br>85套'
    var label = new BMapGL.Label(content, {
      // 创建文本标注
      position: point,
      offset: new BMapGL.Size(10, 20)
    })
    map.addOverlay(label) // 将标注添加到地图中

    // 修改样式
    label.setStyle({
      // 设置label的样式
      color: '#fff',
      fontSize: '16px',
      border: '2px solid #1E90FF',
      width: '100px',
      height: '80px',
      borderRadius: '50%',
      backgroundColor: '#087',
      textAlign: 'center',
      paddingTop: '20px'
    })
  }
}
</script>

<style scoped lang="less">
.van-nav-bar {
  z-index: 1;
}
#container {
  height: 100vh;
}
</style>
